package com.zzw.io;

import java.io.IOException;
import java.net.ServerSocket;

/**
 * Created by Administrator on 2017/7/10.
 */
public class SocketMain {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(0);
        System.out.println(serverSocket.getLocalPort());
        serverSocket.close();
    }
}
